]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-theme-node: reset paint state when theme node changes
authorLionel Landwerlin <llandwerlin@gmail.com>
Wed, 17 Jul 2013 23:58:47 +0000 (00:58 +0100)
committerLionel Landwerlin <llandwerlin@gmail.com>
Thu, 18 Jul 2013 00:12:44 +0000 (01:12 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=704430

src/st/st-theme-node-drawing.c

index 74751dc1d586108fefe8891f8d1b0f9a3ee5df3d..dc5b817a996aaf7b47ead67c6a2ad1baea6b729d 100644 (file)
@@ -2392,7 +2392,13 @@ st_theme_node_paint (StThemeNode           *node,
   if (width <= 0 || height <= 0)
     return;
 
-  if (st_theme_node_needs_new_box_shadow_for_size (state, node, width, height))
+  /* Check whether we need to recreate the textures of the paint
+   * state, either because :
+   *  1) the theme node associated to the paint state has changed
+   *  2) the allocation size change requires recreating textures
+   */
+  if (state->node != node ||
+      st_theme_node_needs_new_box_shadow_for_size (state, node, width, height))
     {
       /* If we had the ability to cache textures on the node, then we
          can just copy them over to the paint state and avoid all